package cn.roadtrip.mtravelbusinessmodule.mvc.travelline;


import cn.roadtrip.mtravelbusinessmodule.bs.travelline.ScenicImpl;
import cn.roadtrip.mtravelbusinessmodule.bs.travelline.TravelLineImpl;
import cn.roadtrip.utilmodule.util.DataBean;
import cn.roadtrip.utilmodule.util.ValidControllerAnn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/travelline")
public class TravelLineController {

    @Autowired
    private ScenicImpl scenicImpl;


    /**
     * 设置景点在路线中得组别
     *
     * @param models
     * @return
     */
    @RequestMapping("/setScenicGroup")
    public DataBean setScenicGroup(@RequestBody java.util.List<ScenicImpl.Model_setScenicGroup> models) {
        return scenicImpl.setScenicGroup(models);
    }

    /**
     * 删除景点
     *
     * @param model
     * @return
     */
    @RequestMapping("/trashScenic")
    public DataBean trashScenic(@RequestBody ScenicImpl.Model_trashScenic model) {
        return scenicImpl.trashScenic(model);
    }

    /**
     * 查询城市景区
     *
     * @param model
     * @return
     */
    @RequestMapping("/getScenicListByCity")
    public DataBean getScenicListByCity(@RequestBody ScenicImpl.Model_getScenicListByCity model) {
        return scenicImpl.getScenicListByCity(model);
    }

    /**
     * 查询租户景区列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/getScenicListByTenant")
    public DataBean getScenicListByTenant(@RequestBody ScenicImpl.Model_getScenicListByTenant model) {
        return scenicImpl.getScenicListByTenant(model);
    }



    /**
     * 获取景点详情
     *
     * @param model
     * @return
     */
    @RequestMapping("/getScenicDetail")
    public DataBean getScenicDetail(@RequestBody ScenicImpl.Model_getScenicDetail model) {
        return scenicImpl.getScenicDetail(model);
    }
    /**
     * 创建景点
     *
     * @param model
     * @return
     */
    @RequestMapping("/createScenic")
    public DataBean createScenic(@RequestBody ScenicImpl.Model_createScenic model) {
        return scenicImpl.createScenic(model);
    }

    /************************************* **********************/

    @Autowired
    private TravelLineImpl travelLineImpl;

    /**
     * 创建旅游路线
     *
     * @param model
     * @return
     */
    @RequestMapping("/createTravelLine")
    public DataBean createTravelLine(@RequestBody TravelLineImpl.Model_createTravelLine model) {
        return travelLineImpl.createTravelLine(model);
    }



    /**
     * 删除预置行程
     *
     * @param model
     * @return
     */
    @RequestMapping("/trashPreTravelLine")
    public DataBean trashPreTravelLine(@RequestBody TravelLineImpl.Model_trashPreTravelLine model) {
        return travelLineImpl.trashPreTravelLine(model);
    }

    /**
     * 旅游路线绑定景区
     *
     * @param model
     * @return
     */
    @RequestMapping("/bindScenicGroup")
    public DataBean bindScenicGroup(@RequestBody java.util.List<ScenicImpl.Model_setScenicGroup> model) {
        return travelLineImpl.bindScenicGroup(model);
    }



    /**
     * 开启路线
     *
     * @param model
     * @return
     */
    @RequestMapping("/turnOnTravelLine")
    public DataBean turnOnTravelLine(@RequestBody TravelLineImpl.Model_turnOnTravelLine model) {
        return travelLineImpl.turnOnTravelLine(model);
    }

    /**
     * 关闭路线
     *
     * @param model
     * @return
     */
    @RequestMapping("/turnOffTravelLine")
    public DataBean turnOffTravelLine(@RequestBody TravelLineImpl.Model_turnOffTravelLine model) {
        return travelLineImpl.turnOffTravelLine(model);
    }



    /**
     * 查询出旅游路线详情
     *
     * @param model
     * @return
     */
    @RequestMapping("/getPreTravelLineDetail")
    public DataBean getPreTravelLineDetail(@RequestBody TravelLineImpl.Model_getTravelLineDetail model) {
        return travelLineImpl.getPreTravelLineDetail(model);
    }



    /**
     * 更新旅游路线信息
     *
     * @param model
     * @return
     */
    @RequestMapping("/updatePreTravelLineInfor")
    public DataBean updatePreTravelLineInfor(@RequestBody TravelLineImpl.Model_updatePreTravelLineInfor model) {
        return travelLineImpl.updatePreTravelLineInfor(model);
    }

    /**
     * 查询旅游路线
     *
     * @param model
     * @return
     */
    @RequestMapping("/getTravelLineList")
    public DataBean getTravelLineList(@RequestBody TravelLineImpl.Model_getTravelLineList model) {
        return travelLineImpl.getTravelLineList(model);
    }
    /**
     * 创建大团
     *
     * @param model
     * @return
     */
    @RequestMapping("/createTravelLineGroup")
    @ValidControllerAnn
    public DataBean createTravelLineGroup(@RequestBody TravelLineImpl.Model_createTravelLineGroup model) {
        return travelLineImpl.createTravelLineGroup(model);
    }

    /**
     * 查询大团列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/queryTravelLineGroupList")
    @ValidControllerAnn
    public DataBean queryTravelLineGroupList(@RequestBody TravelLineImpl.Model_queryTravelLineGroupList model) {
        return travelLineImpl.queryTravelLineGroupList(model);
    }
    /**
     * 首页获取推荐团列表
     *
     * @param model
     * @return
     */
    @RequestMapping("/getHomePageTravelGroupListByKey")
    @ValidControllerAnn
    public DataBean getHomePageTravelGroupListByKey(@RequestBody TravelLineImpl.Model_getHomePageTravelGroupListByKey model) {
        return travelLineImpl.getHomePageTravelGroupListByKey(model);
    }


    /**
     * 修改大团信息
     *
     * @param model
     * @return
     */
    @RequestMapping("/updateTravelListGroup")
    @ValidControllerAnn
    public DataBean updateTravelListGroup(@RequestBody TravelLineImpl.Model_updateTravelListGroup model) {
        return travelLineImpl.updateTravelListGroup(model);
    }
}
